package com.zhiyou100.review.day005.port.demo.port;

/**
 * @packageName: test
 * @className: com.zhiyou100.review.day005.port
 * @Description: TODO
 * @author: yang
 * @date: 6/13/20
 */
public class Test {
    public static void main(String[] args) {
//        Electronic electronic = new Electronic()；
        // // 接口不能直接实例化
//        int electricityUsr = electronic.getElectricityUsr();
//        System.out.println(electricityUsr);
    }
}

abstract class AbstractFather {
    static int i = 11;
    int a = 1;
    int b = 2;

    void hehe() {
    }

    abstract void hai();

    public AbstractFather(int a, int b) {
        this.a = a;
        this.b = b;
    }

    public AbstractFather() {
    }
}

class Son extends AbstractFather {
    static int j = 12;
    int a = 10;
    // 子类重新定义
    int c = 3;
    // 子类特有


    // 重写
    @Override
    void hehe() {

    }

    // 重写
    @Override
    void hai() {
    }

    // 子类特有
    void nihao() {
    }

    Son() {
    }

    Son(int a, int b, int c) {
        super(a, b);
        this.c = c;
    }

}

class Test1 {
    public static void main(String[] args) {
        Son son = new Son();
        // 子类特有

        AbstractFather fatherAndSon = new Son(21, 22, 23);
        // 多态对象
    }
}
